package proxy

import (
	"fmt"
)

type GiveGift interface {
	GiveDolls()
	GiveFlowers()
	GiveChocolate()
}

type SchoolGirl struct {
	name string
}

func NewSchoolGirl(n string) *SchoolGirl {
	r := new(SchoolGirl)
	r.name = n

	return r
}

func (p *SchoolGirl) GetName() string {
	return p.name
}

type Proxy struct {
	gg *Pursuit
}

func NewProxy(m *SchoolGirl) *Proxy {
	r := new(Proxy)
	r.gg = NewPursuit(m)

	return r
}

func (p *Proxy) GiveDolls() {
	p.gg.GiveDolls()
}

func (p *Proxy) GiveFlowers() {
	p.gg.GiveFlowers()
}

func (p *Proxy) GiveChocolate() {
	p.gg.GiveChocolate()
}

type Pursuit struct {
	mm *SchoolGirl
}

func NewPursuit(m *SchoolGirl) *Pursuit {
	r := new(Pursuit)
	r.mm = m

	return r
}

func (p *Pursuit) GiveDolls() {
	fmt.Println(p.mm.GetName(), "送你洋娃娃")
}

func (p *Pursuit) GiveFlowers() {
	fmt.Println(p.mm.GetName(), "送你鲜花")
}

func (p *Pursuit) GiveChocolate() {
	fmt.Println(p.mm.GetName(), "送你巧克力")
}
